/*****************************************************************************
*
*  PROJECT:     Projekt-grupp6
*  FILE:        menu_net.h
*  PURPOSE:     Header file for menu_net.c
*  DEVELOPER(S):  Kuchar Moulod Nizhad <kuchar@kth.se>
*
*****************************************************************************/

#ifndef MENU_NET_H
#define MENU_NET_H

struct playerdata {
	int uhm;
	int id;
	char name[512];
	char ip[16];
};

void OpenConnection_tcp();
int send_name_tcp(char *name);
void request_lobby(struct playerdata pldata[10]);
void tcp_sendduelrequest(int ID, int map, int character);
int tcp_lobbythread(void *parameters);
int getchallengedchar();
int getaccept();
void tcp_startlobbythread();
int getaction();
int getchallengerid();
int getchallengermap();
int getchallengerchar();
void resetaction();
void tcp_stoplobbythread();
void tcp_acceptduelrequest(int localchar);
void tcp_declineduelrequest();
void CloseConnection_tcp();

#endif